package cn.zysuyuan.user.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.util.Date;

/**
 * 此类只比user类少一个JsonIgnore注解，主要用于更新
 * @author flypig
 * @version 1.0
 * @dae 2019-11-25 16:24
 */

//@Table(name = "z_user")
public class UserUpdate implements Serializable {

    private static final long serialVersionUID = 1L;
    private String id;      //用户id
    @Length(min = 4, max = 30, message = "用户名只能在4~30位之间")
    private String uName;   //用户名称
    private Integer uType;   // 用户类型
    @Length(min = 4, max = 30, message = "密码只能在4~30位之间")
    private String uPass;    // 用户密码
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date uCreateTime;       // 创建日期
    private String uContact;       //用户联系方式
    private String uEmail;         //用户邮箱
    private String uRemark;        // 备注信息
    private String uHeadpath;      // 头像地址
    private String uNickname;      // 用户昵称
    private String zRoles;      // 拥有的权限名称
    private Integer zType;      // 权限类型
    private String zRemark;     // 权限说明

    @JsonIgnore
    private String salt;

    private String level;

    public String getuEmail() {
        return uEmail;
    }

    public void setuEmail(String uEmail) {
        this.uEmail = uEmail;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getuName() {
        return uName;
    }

    public void setuName(String uName) {
        this.uName = uName;
    }

    public Integer getuType() {
        return uType;
    }

    public void setuType(Integer uType) {
        this.uType = uType;
    }

    public String getuPass() {
        return uPass;
    }

    public void setuPass(String uPass) {
        this.uPass = uPass;
    }

    public Date getuCreateTime() {
        return uCreateTime;
    }

    public void setuCreateTime(Date uCreateTime) {
        this.uCreateTime = uCreateTime;
    }

    public String getuContact() {
        return uContact;
    }

    public void setuContact(String uContact) {
        this.uContact = uContact;
    }

    public String getuRemark() {
        return uRemark;
    }

    public void setuRemark(String uRemark) {
        this.uRemark = uRemark;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getuHeadpath() {
        return uHeadpath;
    }

    public void setuHeadpath(String uHeadpath) {
        this.uHeadpath = uHeadpath;
    }

    public String getuNickname() {
        return uNickname;
    }

    public void setuNickname(String uNickname) {
        this.uNickname = uNickname;
    }

    public String getzRoles() {
        return zRoles;
    }

    public void setzRoles(String zRoles) {
        this.zRoles = zRoles;
    }

    public Integer getzType() {
        return zType;
    }

    public void setzType(Integer zType) {
        this.zType = zType;
    }

    public String getzRemark() {
        return zRemark;
    }

    public void setzRemark(String zRemark) {
        this.zRemark = zRemark;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    @Override
    public String toString() {
        return "UserUpdate{" +
                "id='" + id + '\'' +
                ", uName='" + uName + '\'' +
                ", uType=" + uType +
                ", uPass='" + uPass + '\'' +
                ", uCreateTime=" + uCreateTime +
                ", uContact='" + uContact + '\'' +
                ", uEmail='" + uEmail + '\'' +
                ", uRemark='" + uRemark + '\'' +
                ", uHeadpath='" + uHeadpath + '\'' +
                ", uNickname='" + uNickname + '\'' +
                ", zRoles='" + zRoles + '\'' +
                ", zType=" + zType +
                ", zRemark='" + zRemark + '\'' +
                ", salt='" + salt + '\'' +
                ", level='" + level + '\'' +
                '}';
    }
}
